package com.young.job;

import java.util.List;

/**
 * @description：任务上下文信息
 * @author: yangyahui01
 * @date: 11/25/24 2:51 PM
 */
public class JobContext {
    private String jobUniqCode;

    /**
     * 任务当前时间调度的唯一码
     */
    private String traceId;

    // 任务回传数据
    private String data;

    /**
     * 任务执行策略
     * 0 --> 第一个节点执行
     * 1 --> 随机节点执行
     * 2 --> 全节点执行
     * 3 --> 分片执行
     */
    private Integer jobStrategyCode;

    /**
     * 执行节点总数量
     */
    private Integer jobNodeNum;
    /**
     * 当前执行节点index
     */
    private Integer jobNodeIndex;

    /**
     * server端调度平台服务节点
     */
    private List<ScheduleServerInstanceDO> callBackNodes;


    /**
    set get 方法
    */
    public String getJobUniqCode() {
        return jobUniqCode;
    }

    public void setJobUniqCode(String jobUniqCode) {
        this.jobUniqCode = jobUniqCode;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Integer getJobStrategyCode() {
        return jobStrategyCode;
    }

    public void setJobStrategyCode(Integer jobStrategyCode) {
        this.jobStrategyCode = jobStrategyCode;
    }

    public Integer getJobNodeNum() {
        return jobNodeNum;
    }

    public void setJobNodeNum(Integer jobNodeNum) {
        this.jobNodeNum = jobNodeNum;
    }

    public Integer getJobNodeIndex() {
        return jobNodeIndex;
    }

    public void setJobNodeIndex(Integer jobNodeIndex) {
        this.jobNodeIndex = jobNodeIndex;
    }

    public List<ScheduleServerInstanceDO> getCallBackNodes() {
        return callBackNodes;
    }

    public void setCallBackNodes(List<ScheduleServerInstanceDO> callBackNodes) {
        this.callBackNodes = callBackNodes;
    }
}
